package com.ruoyi.Warehouse.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.Warehouse.mapper.InventorycheckdetailsMapper;
import com.ruoyi.Warehouse.domain.Inventorycheckdetails;
import com.ruoyi.Warehouse.service.IInventorycheckdetailsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 盘点明细表Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-16
 */
@Service
public class InventorycheckdetailsServiceImpl implements IInventorycheckdetailsService 
{
    @Autowired
    private InventorycheckdetailsMapper inventorycheckdetailsMapper;

    /**
     * 查询盘点明细表
     * 
     * @param detailId 盘点明细表主键
     * @return 盘点明细表
     */
    @Override
    public Inventorycheckdetails selectInventorycheckdetailsByDetailId(Long detailId)
    {
        return inventorycheckdetailsMapper.selectInventorycheckdetailsByDetailId(detailId);
    }

    /**
     * 查询盘点明细表列表
     * 
     * @param inventorycheckdetails 盘点明细表
     * @return 盘点明细表
     */
    @Override
    public List<Inventorycheckdetails> selectInventorycheckdetailsList(Inventorycheckdetails inventorycheckdetails)
    {
        return inventorycheckdetailsMapper.selectInventorycheckdetailsList(inventorycheckdetails);
    }

    /**
     * 新增盘点明细表
     * 
     * @param inventorycheckdetails 盘点明细表
     * @return 结果
     */
    @Override
    public int insertInventorycheckdetails(Inventorycheckdetails inventorycheckdetails)
    {
        return inventorycheckdetailsMapper.insertInventorycheckdetails(inventorycheckdetails);
    }

    /**
     * 修改盘点明细表
     * 
     * @param inventorycheckdetails 盘点明细表
     * @return 结果
     */
    @Override
    public int updateInventorycheckdetails(Inventorycheckdetails inventorycheckdetails)
    {
        return inventorycheckdetailsMapper.updateInventorycheckdetails(inventorycheckdetails);
    }

    /**
     * 批量删除盘点明细表
     * 
     * @param detailIds 需要删除的盘点明细表主键
     * @return 结果
     */
    @Override
    public int deleteInventorycheckdetailsByDetailIds(String detailIds)
    {
        return inventorycheckdetailsMapper.deleteInventorycheckdetailsByDetailIds(Convert.toStrArray(detailIds));
    }

    /**
     * 删除盘点明细表信息
     * 
     * @param detailId 盘点明细表主键
     * @return 结果
     */
    @Override
    public int deleteInventorycheckdetailsByDetailId(Long detailId)
    {
        return inventorycheckdetailsMapper.deleteInventorycheckdetailsByDetailId(detailId);
    }
}
